home *** CD-ROM | disk | FTP | other *** search
/ Interplay's Learn to Program Basic (Review Copy) / Learn to Program Basic Review Copy (Interplay)(June 23, 1998).ISO / pc / ltpbasic / refxmpl / fileopen.bas < prev    next >
BASIC Source File  |  1998-04-07  |  269b  |  19 lines

  1. Rem write out a file
  2. Rem with some numbers
  3. FileOpen "Test", NEW EXIST
  4. For x = 1 to 10
  5. FileWrite x * 3
  6. Next
  7. FileClose
  8.  
  9. CLS
  10. Rem now open it and read it
  11. FileOpen "Test"
  12. Rem Read from file until file ends
  13. While FileRead n$ 
  14. Rem print what we read
  15. print n$
  16. Wend
  17. FileClose
  18.